Grid7

A = (4.113924670605923, 3.15086233384194)
B = (4.511632015372307, 3.319586661924648)
d_{AB} = Distance(A, B)
θ: atan(Slope[Line[A, B]])
m = 4 (slider from 0 to 10, step 1)
n = 3 (slider from 0 to 10, step 1)
a = Segment(A, B)
GridAllPerpABsegments = Sequence(Segment[(x(A) + j * d_{AB} * cos(θ) - m * d_{AB} * sin(θ), y(A) + j * d_{AB} * sin(θ) + m * d_{AB} * cos(θ)), (x(A) + j * d_{AB} * cos(θ) + m * d_{AB} * sin(θ), y(A) + j * d_{AB} * sin(θ) - m * d_{AB} * cos(θ))], j, -n, n)